package com.dzu.gulimall.product.feign;

import com.dzu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author by ZhaoDong
 * @Classname WareFeignService
 * @Description 调用远程仓库
 * @Date 2021/6/17 20:09
 */
@FeignClient("gulimall-ware")
public interface WareFeignService {

    /**
     * 1、R设计的时候加上泛型
     * 2、直接返回我们想要的数据
     * 3、自己封装解析结果
     * @param skuId
     * @return
     */
    @PostMapping("/ware/waresku/hasStock")
    R getSkuHasStock(@RequestBody List<Long> skuId);
}
